package com.xmall.controller.admin;


import com.xmall.bean.vo.BaseRespVo;
import com.xmall.bean.table.RegionVO;
import com.xmall.service.MallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("admin/region")
public class RegionController {

    @Autowired
    MallService mallService;

    @RequestMapping("list")
    public BaseRespVo administrativeRegion(){
        List<RegionVO> regionVOS = mallService.administrativeRegion();
        BaseRespVo baseRespVo = new BaseRespVo();
        return BaseRespVo.ok(regionVOS);
    }
}
